fix: make all four demos runnable end-to-end against the real cMCP Runtime#11
Merged
Merged
Conversation
…ntime
Verified by running every demo locally against cmcp (with upstream
forwarding, Cedar advice, and session close): all decisions and advice
payloads match the README narratives, and every trace-output/ file is now
captured from a real run.
- Cedar policies: rewritten in valid Cedar. The previous files used a
nonexistent `advice {...}` clause (parse error -> every call denied) and
matched on Action::"tool_call" / Tool::"..." scopes the runtime never
sends. Rules now match real action names (Action::"Ehr.treatmentPlanWriter"),
read arguments via context.arguments.*, and carry @annotations that the
runtime returns as structured advice on denies.
- Catalogs: sensitivity_level "internal" is not in the schema enum (runtime
exited at startup); replaced with valid values. financial document_reader
compliance_domain corrected from hipaa_phi to mnpi.
- Agents: use the real API -- _cmcp metadata (session_id, would_have_denied,
advice), error.data.advice on 403s, and POST /sessions/{id}/close to obtain
the signed RuntimeClaim. Removed calls to GET /trace and cmcp-verify,
neither of which exists.
- Mock MCP servers: each example ships a stdlib-only server/mock_mcp_server.py
serving its catalog tools on :8080, so demos run with zero external deps.
- acme-corp tenant now runs enforcement_mode: advisory, making the
advisory-vs-enforcing tenant contrast real (was impossible per-rule).
- READMEs: 3-terminal flow, run from inside the example dir (config paths
resolve relative to CWD), real expected outputs, real TRACE record shape.
- financial agent: escalation now triggered via --amount-eur 750000 instead
of editing source.
Requires cmcp PRs #278-#282 (wiring, advice, forwarding, session close).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jun 11, 2026
imran-siddique
added a commit
that referenced
this pull request
Jun 12, 2026
PRs #11, #13, and #14 were stacked on #10. When #10 squash-merged and its branch was deleted, GitHub closed/merged the rest of the stack into the deleted feature branches, so their content never reached main: financial and healthcare shipped the unparseable advice{} Cedar policies, agents called endpoints that do not exist, the mock servers and the cmcp verify tamper demo were missing. This restores the verified stack tip for the four original examples plus .gitignore, with em dashes scrubbed per repo style, and merges the root README: corrected table and 3-terminal quickstart from the stack, plus the industrial-embodied-ai row with the #18 wording. Verified before commit: all Cedar bundles parse and produce the documented decisions (workflow-scoped allow, escalation/HITL deny, default deny), and all catalog entries validate against the cmcp schema. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Today's codebase review found the demos could not run: Cedar policies failed to parse (nonexistent
advice {}clause -> every call denied), policy scopes never matched the runtime's actual Cedar requests, catalogs failed schema validation at startup, and agents called endpoints (GET /trace,cmcp-verify) that do not exist. This PR makes all four demos runnable end-to-end -- verified by actually running each one locally against cmcp with PRs agentrust-io/cmcp#278-#282.What changed
@annotationadvice metadata, real action names (Action::"Ehr.treatmentPlanWriter"),context.arguments.*conditions. Verified with cedarpy: every decision and annotation payload matches the README narrative.sensitivity_level: "internal"(not in the schema enum -- runtime exited at startup);finance.document_readerdomain correctedhipaa_phi->mnpi._cmcpmetadata (session_id,would_have_denied,advice),error.data.adviceon 403s,POST /sessions/{id}/closeto obtain the signedRuntimeClaim.server/mock_mcp_server.pyper example; demos run with zero external dependencies.enforcement_mode: advisory-- the advisory-vs-enforcing tenant contrast is now real (per-rule advisory was never a thing).trace-output/files are captured from real runs (signed claims, real audit chain hashes).Verified locally
--trigger-hitldenies witheu-ai-act-art-14advice--amount-eur 750000denies withmifid-ii-art-25adviceDepends on agentrust-io/cmcp#278, #279, #280, #282 (wiring, Cedar advice, upstream forwarding, session close). Stacked on #10.
Generated with Claude Code